A novel competitive exact approach to solve assembly line balancing problems based on lexicographic order of vectors

The assembly line balancing problem (ALBP) is an eminent NP-hard topic that is discussed in mass production systems with low diversity. Primarily, two types of ALBPs are discussed in the literature as type I, which aims to find the minimum number of workstations for a given cycle time, and type II, which assigns some tasks to a given number of workstations such that the maximum workstation load is minimized. To solve ALBPs, various exact, heuristic, and metaheuristic methods have been proposed. However, these methods lose their efficiency when handling large-size problems. Therefore, researchers have focused on proposing heuristic and metaheuristic algorithms to solve large-size problems, especially when they deal with real-life case problems in the industry. This study aims to present a novel and competitive exact method for solving ALBP type II based on the lexicographic order of vectors for feasible solutions. To evaluate the performance of the developed method, a group of highly used standard test problems in the literature is utilized, and the results are compared and discussed in detail. The computational results in this study specify that the developed solution approach performs efficiently and yields the best global solution of all the ALB test problems, which proves the proposed method's potential and its competitive advantage.


Introduction
Assembly lines include flow-oriented manufacturing processes consisting of workstations, as productive units, to perform operations; and various tasks are added to a product sequentially at workstations [1][2][3]. Setting up an assembly lineup is a long-standing decision, which typically needs vast capital investment. Hence, it is vital to design and balance assembly lines as efficiently as possible [4,5]. Most of the literature related to assembly lines pertains to workstation load balancing. The assembly line balancing

Problem definition
To minimize the cycle time of single-product manufacturing with a known fixed number of workstations, ALBP type-II, the necessary assumptions, and definitions are listed as follows: -The precedence diagram, containing all the predecessors and successors of tasks, is given. -All tasks are accessible in the beginning.
-The processing times of tasks are fixed. The processing time of task i is ti time unit.
-Tasks may not be divided into two or more workstations, and each task should be assigned to one and only one station. In other words, each task must be processed and completed in only one workstation. -Allocation limitation is non-existent except for precedence limitations.
-A task can be processed in any workstation given that its predecessors are processed in the previous or at the same workstation. , the first one that was developed by Bowman [50]. In the following, one of the recent mathematical models for solving ALBP type-II, prepared by Zheng et al. [51] is presented.

minimize C
(1) Subject to: ∑ m j=1 x ij = 1∀i = 1, …, n x ij = 0, 1∀i = 1, …, n, j = 1, …, m In the mentioned mathematical formulation, the objective function is defined by equation (1), which is related to minimizing the cycle time. Constraint (2), force each task to be assigned to one and only one workstation, where n tasks and m workstations exist. Constraint (3) ensures that the precedence conditions are considered. Inequality (4) implies that the access time for every workstation may not be more than the cycle time, and finally, constraint (5) defines all the decision variables of x ij as binary variables.

Solution method
The procedure of the proposed method in this study contains three steps. First, the traditional lexicographic order of vectors should be introduced. In the second step, the order is discussed in the Boolean case, i.e., 0-1 vectors, and finally, it is used to obtain an implicit enumeration scheme for assigning the tasks to the workstations.

The lexicographic order of vectors
To explain the lexicographic order of vectors, initially, it should be defined that the order of objects is a partial order if incomparable pairs of objects exist. Additionally, a well-known partial order is the component-wise order of vectors. The vectors u, w ∈ R 2 are incomparable if they contain a pair of components with opposite magnitudes. For example, u 1 < w 1 and u 2 > w 2 or the opposite, i.e., u 1 > w 1 and u 2 < w 2 . The lexicographic order is complete as any two vectors having the same dimension are comparable, because it follows immediately from the definition of the lexicographic order. Definition 3.1. Let u, w ∈ R n be two n-dimensional vectors. The vector u is lexicographically smaller than the vector w if an index k (1 ≤ k ≤ n) exists such that a) u i = w i i = 1, …, k − 1, and b) u k < w k . This relation is denoted by u ◄w.
Every order is determined by a cone in linear spaces. The relation u ◄w is true if and only if a vector v exists such that u + v = w, and v ∈ {t ∈ R n : t 1 > 0} ∪ {t ∈ R n : t 1 = 0, t 2 > 0} ∪ … ∪ {t ∈ R n : t i = 0, i = 1, …, n − 1, t n > 0}.

The lexicographic order in the case of Boolean vectors in a general and a constrained problem
Lexicographically, the greatest vector is (1,1, …,1,1), and the second greatest vector is (1,1, …,1,0). Let's assume that u is a nonzero binary vector, as only finite Boolean vectors exist. Subsequently, an index t may exist such that u t = 1, u t+1 = … = u n = 0. In the lexicographical decreasing order, the next vector is v with Consequently, the zero vector is the lexicographically minimal binary vector, and no vector exists thereafter. In the method described below, binary vectors are used to identify the tasks assigned to the workstations. Each workstation has its binary vector like u j such that it is component u j i is 1 if operation i is assigned to workstation j and 0, otherwise. Assume that a feasible vector exists such as u, where u 1 = … = u t = 1, Therefore, the next lexicographical feasible vector is generated using Eqs. (6)- (8).
where e k is the k th unit vector. The ALBP comprises two types of constraints including that a load of a workstation may not exceed the cycle time, and the assigned tasks must satisfy the precedence relation. Both constraints exhibit the following properties: (a) If a set of tasks satisfies the constraints, then all of its subsets satisfy the constraints as well. (b) If a set (S) of tasks violates the constraints, then all sets T violate the constraints as well if S⊂T. This property enables many infeasible orders to be skipped and larger steps to be performed in the lexicographical enumeration of the binary vectors. The key point is that the enumeration leaps from one feasible vector to the next feasible vector, lexicographically. The proposed algorithm starts with the calculation of the upper and lower bounds of the cycle time that are calculated by equation (9).
where α is an arbitrary coefficient such that α > 1. A large value for α would increase the CPU time, and a small value would increase the risk of losing the feasibility. In this study, and after some initial experiments, α is considered equal to 1.5. The lower bound is calculated by equation (9), considering α = 1. The upper bound is used as the initial value for the cycle time and the lower bound is considered as the stopping criteria. It should be mentioned that in case of obtaining a non-integer value for the upper bound, the value is rounded up. To initiate the algorithm, tasks are first ordered based on the total number of successive tasks. The higher the total number of successive tasks, the lower the order of the task; and consequently, the higher the priority of its assignment. In the case of ties, priority is given to the task with a higher processing time. The algorithm starts with assigning the first activity to the first station and continues assigning subsequent tasks individually according to their order to the same workstation while the load of the workstation does not exceed the cycle time; subsequently, it proceeds to the next workstation. The algorithm continues until all the tasks are assigned to the workstations. It is obvious that the ending task, i.e., a task with no successor is always assigned to the last workstation if only one task exists. If more than one starting task exists, a dummy task is added before them, to serve as the starting task by setting all the original starting tasks as the successors of this dummy task. Similarly, if more than one ending task exists, a dummy task is considered to serve as the ending task, and the original ending task will be its predecessor. If a feasible solution is found, then C becomes less than the best cycle time by a one-time unit. The algorithm verifies the first workstation to confirm whether the assigned load has violated the cycle time. If the cycle time is not violated, the next workstation is evaluated; however, if the cycle time is violated, the assignment vector of the workstation is changed to the next lexicographic order. The assignment vector would change continuously to the next lexicographic order until the load of the workstation is less than the cycle time and the assignment is feasible. If a zero vector is reached, the algorithm would return to the previous workstation and attempt to obtain the next feasible lexicographic order for that station. To avoid complete enumeration, a cutting criterion is considered whenever the assignment of tasks to a workstation is completed. When the assignment of the i th workstation is completed, the algorithm would verify the feasibility of the incomplete solution to avoid the complete enumeration of the feasible area. The partial solution is infeasible if equation (10) is not violated.
In this case, the next lexicographic order of the assignment vector is considered for the i th workstation until the feasibility of the partial solution is satisfied. At the end of each iteration, the successful assignment and the corresponding cycle time are saved as the best solution found, and the algorithm continues to the next iteration by reducing the value of C, with one unit, and beginning the procedure from the first workstation. The algorithm stops if no feasible solution is found for the updated C, and the best-recorded solution in the previous iteration is returned by the algorithm. In the proposed algorithm, two important points are noteworthy. The first one is that obtaining the next feasible lexicographic order of an assignment vector for a workstation may lead to a zero vector. In this case, the lexicographic order change would proceed to the previous workstation. The second point is while attempting to determine the assignment of a specific workstation, the proceeding workstation is considered unassigned, implying that zero vectors exist for the next workstations. The assignment is performed only for those tasks that have not been assigned to the previous workstations. The algorithm returns to the previous workstation if the assignment vector changes to zero vector during the change to the next feasible load on the lexicographic order. If this chain of changes returns to the first workstation and it changes to a zero vector, no feasible solution for the specified cycle time is implied, and the algorithm stops at this point. The pseudocode of the algorithm is illustrated in Fig. 1.
Rank the tasks based on the total number of successors Calculate Upper and Lower bounds C ← upper bound Assign tasks to each workstation such that for each workstation j we have ∑  Rank the tasks based on the total number of successors The flowchart of the proposed lexicographic algorithm has been illustrated in Fig. 2. To explain how the proposed algorithm solves the ALBPs based on the proposed lexicographic method in this study, a precedence diagram comprising 12 tasks, to be assigned to 3 workstations, m = 3, is considered [22]. Fig. 3 illustrates the predecessors and successors of each task and the task times that are mentioned at the top of each node.
According to the precedence graph, Fig. 3, the first task is assigned to workstation 1 first. Then, one task among tasks 2 and 4 is chosen to be assigned to workstation 1 or workstation 2, if the idle time of the first workstation is insufficient. Similarly, the other task is assigned to the workstations up to assigning all the tasks. The proposed algorithm is as follows: Step 1. Calculate the number of total successors for each task. Table 1 shows the number of successors for each task in the precedence graph shown in Fig. 3.
Step 2. Order the activities based on the total number of successor activities obtained in step 1. In the case of ties, the activity with a greater task time is selected; in case the task times are also equal, one of them is selected randomly. Table 2 presents the order of the tasks and their corresponding number of successors in decreasing order.
Step 3. The upper and lower bounds of the cycle time are calculated using equation (9). The obtained lower bound is equal to 17 considering α = 1 and m = 3. The upper bound is equal to 25.5 considering α = 1.5 using similar calculations. After rounding up, the upper bound will be 26-time units.
Step 4. The initial assignment is performed as explained before, and its results are as shown in Table 3, by considering a cycle time of 26: Step 5. Considering the initial solution, which is acquired in step 4, and the cycle time which is equal to 26, the next iteration starts by considering the cycle time = 26-1 = 25. It is obvious that the load of the first workstation exceeds that of the cycle time; thus, the next lexicographic order of the assignment vector is considered. Furthermore, all the assignment vectors for the workstations after the current workstation are set equal to zero. If the next lexicographic order satisfies the feasibility conditions, the assignment continues to the last workstation, as explained. Therefore, the results of the next iteration are as shown in Table 4.
The cycle time here is 23; this solution is saved as the best solution and the next iteration starts with a cycle time of 22; the results are illustrated in Table 5. At the end of the previous step, the cycle time is 22, therefore the cycle time of 21 is considered for the next step the results are shown in Table 6. Additionally, the algorithm would continue until the stopping criteria are fulfilled. Tables 7-9, illustrate the results of the repetition of performing similar steps, especially the change in assignment vectors into the next lexicographic.
As the cycle time is 17, which is equal to the lower bound of the problem, the algorithm is stopped. Fig. 3. Sample of the precedence graph.

Table 1
The total number of successors for the activities is given in Fig. 3.   Table 3 Instant problem -initial assignment.
Task no.    Table 5 Instant problem -third iteration.
Task no.

Results and discussions
In this part, outputs obtained by applying the proposed method for various standard ALB test problems are presented and compared to the best-found solutions in the literature [18]. 16 different test problems have been considered in the literature, which can be also found in the "www.assembly-line-balancing.de" website address. To solve these problems, the proposed method has been coded in MATLAB R2016b, and a computer with Intel(R) Core(TM) i5-3320 M CPU@ 2.60 GHz and 4.00 GB of RAM properties were utilized. Table 10 shows the names and details of the used standard test problems.
Task no.  Table 8 Instant problem -sixth iteration.
Task no.  Table 9 Instant problem -last iteration; optimal results achieved.
Task no.  In Table 10, the first two columns from the left, are related to the test problem numbers and the test problem names. The third column entitled "Task no.", contains the number of activities in the related test problem. In the next three columns, t min is the least task time among all the tasks, t max is the supreme task time among all tasks, and t sum is the summation of all the task times of the related test problem. Finally, the last column entitled "Station no. (min-max)" illustrates the given minimum and the maximum number of workstations used to test the proposed method. For instance, in the first row of Table 10, the test problem of Arcus1, which has been solved considering 3 to 7 workstations has been shown. Table 11 presents the results of solving the test problems mentioned in  Table 10. In this table, the first column shows the name of the test problems. The second column is related to the number of tasks in each of the test problems. Columns 3 to 5 indicate the number of workstations, minimum cycle time, and CPU time for solving the test problems, respectively. Since the proposed method in this study yields the optimal solution for all of the test problems, only one column is related to the optimal solution, and the results of the proposed method are in Table 11. The optimal results are consistent with those found using the SALOME method [18].
As shown from the results in Table 10, 146 out of 158 problems have been solved in less than 3 min using the proposed lexicographic method. Four test problems have been solved between 3 and 10 min, and only eight test problems have been solved in more than 10 min. From another perspective, all the test problems related to Bartold, Bartol2, Buxey, Gunter, Hahn, Kilbridge, Lutz1, Lutz 3, Mukherje, Sawyer, Tonge, Warnecke, and Wee-Mag, have been solved in less than 10 min that shows the efficiency of the proposed lexicographic method.

Comparative analysis
To analyze the efficiency of the proposed method in this study, the results of the grouping evolution strategy method (GES) have been considered. GES is one of the efficient methods to solve ALBPs according to the literature. Different standard test problems are considered to compare the proposed lexicographic method in this study and the GES method, according to Table 12. The name of the test problems, task times, cycle time, obtained workstation numbers, and the CPU time for the GES method have been listed in Table 12. Additionally, the results obtained by the proposed lexicographic method have been listed in the last two columns of the table. According to Nejad and Kashan [], to solve these problems using the GES method, a computer with Intel(R) Core(TM) i5-3470 CPU@ 3.20 GHz and 8.00 GB of RAM properties have been utilized, and the method has been coded in MATLAB R2017a. It is seen that the utilized technology in their research, has significantly higher performance than the utilized software and computer in this study.
The results in Table 12 show that among 10 test problems, 8 optimal answers have been obtained by the GES algorithm but all of the optimal answers have been obtained by the proposed Lexicographic method. Additionally, the average CPU time for the GES algorithm is 13.95 s while the average time of the Lexicographic method is 2.58 s. The results illustrate that the proposed Lexicographic method is significantly more efficient than the GES method.

Conclusion
In this study, a general ALBP, considering minimization of the cycle time, given several workstations, ALBPs type-II, was considered. To solve such a problem, a novel exact method based on the lexicographic order of vectors was presented. Using wellknown test problems in the literature, the proposed method was solved and the results were compared to the obtained optimal answers by the SALOME method proposed by Scholl and Klein [18]. The experimental results and the performance of the proposed lexicographic method illustrated that the optimal global solutions of all ALBP test problems were obtained, efficiently. Moreover, the obtained results were compared to the results of the grouping evolution strategy (GES) method presented by Nejad and Kashan []. This method is one of the recent metaheuristic methods and one of the most efficient ones among the presented algorithms in the literature, especially for solving straight-line layouts of ALBPs. The evaluations proved that the CPU time of the proposed method is significantly less that the GES metaheuristic algorithm. Additionally, the GES algorithm cannot obtain the global optimal solutions for all of the test problems. As the proposed lexicographic-based method was so effective for solving ALBPs type-II, the authors are adapting a similar lexicographic solution approach for solving ALBPs type-I, which is the minimization of the number of workstations, given the value of the cycle time. Moreover, the method proposed in this study has enough potential to be adjusted for solving traditional scheduling and optimization problems such as bin packing, knapsack, set covering problems, etc. that can be considered as future studies.

Author contribution statement
Shifu Xu; Seyed Mahdi Shavarani: Conceived and designed the experiments; Analyzed and interpreted the data; Contributed reagents, materials, analysis tools or data; Wrote the paper.
Mazyar Ghadiri Nejad: Conceived and designed the experiments; Performed the experiments; Analyzed and interpreted the data; Contributed reagents, materials, analysis tools or data; Wrote the paper. Bela Vizvari; Davood toghraie: Performed the experiments; Analyzed and interpreted the data; Contributed reagents, materials, analysis tools or data; Wrote the paper.

Funding statement
This work was supported by the General Project of Education Department of Zhejiang Province (Y201737089), Project of Educational Science Planning in Zhejiang Province (2022SCG111), National Innovation and Entrepreneurship Program for College Students (202113277010, 202213277003) and University-level Scientific Research Fund (XYL20016, YK202208).

Data availability statement
No data was used for the research described in the article.

Declaration of interest's statement
The authors declare no competing interests.

Table 12
Comparative results between the GES and the proposed Lexicographic method.